package etc.spec.ytt.week07.class2;

public class Student {
    private String xm;
    private String xh;
    private static String bj="zn1b";
    private static String zy="zncpkf";

    public String getxm(){
        return this.xm;
    }
    public void setxm(String xm){
        this.xm=xm;
    }
    public String getxh(){
        return this.xh;
    }
    public void setxh(String xh){
        this.xh=xh;
    }
    public static String getbj(){
        return bj;
    }
    public static void setbj(String bj){
        Student.bj=bj ;
    }
    public Student(String  xm,String  xh){
        this.xm=xm;
        this.xh=xh;
    }
    public static void main(String[] args){
        System.out.println(Student.bj); //静态成员（属性和方法）可以通过类名直接访问
        System.out.println(Student.getbj());//静态成员（属性和方法）可以通过对象直接访问
        Student s=new Student("ytt","111");
        System.out.println(s.bj);
        System.out.println(s.getbj());

    }
}
